<div id="work_edit_div" class="am-g" style="height: 100%;">
    <div class="am-u-sm-4" style="padding: 0; border-right: 1px solid #DEDEDE;height: 100%;">
        <div id="work_edit_div_introd" class="web-work-edit-div">
            <div class="web-work-edit-tittle">
                <b class="web-main-color">作品灵感介绍</b>
            </div>
            <div class="web-work-edit-content">
                <textarea id="work_edit_content_introd"
                          placeholder="和大家分享一下你的创作灵感吧（点击编辑）"><?php if (isset($workMsg)) echo $workMsg->Introd; ?></textarea>
            </div>
        </div>
        <div id="work_edit_div_stype" class="web-work-edit-div" style="display: none;">
            <div class="web-work-edit-tittle">
                <b class="web-main-color">鞋款编辑</b>
            </div>
            <div class="web-work-edit-content">
                <textarea placeholder="请输入鞋款（点击编辑）"
                          id="work_edit_content_stype"><?php if (isset($workMsg)) echo $workMsg->SType; ?></textarea>
            </div>
        </div>
        <div id="work_edit_div_tags" class="web-work-edit-div" style="display: none;">
            <div class="web-work-edit-tittle">
                <b class="web-main-color">标签编辑</b>
            </div>
            <div class="web-work-edit-content">
                <textarea placeholder="请输入关键词便于搜索到此作品（点击编辑）"
                          id="work_edit_content_tags"><?php if (isset($workMsg)) echo $workMsg->Tags; ?></textarea>
            </div>
        </div>
        <div id="work_edit_div_releasedt" class="web-work-edit-div" style="display: none;">
            <div class="web-work-edit-tittle">
                <b class="web-main-color">发布日期</b>
            </div>
            <div class="web-work-edit-content">
                <input id="work_edit_content_releasedt" type="text" placeholder="请选择日期" readonly="readonly"
                       required="required" value="<?php if (isset($workMsg)) echo $workMsg->ReleaseDt; ?>"/>
            </div>
        </div>
    </div>
    <div class="am-u-sm-8" style="padding: 0;height: 100%;">
        <div class="web-work-edit-tittle am-text-xs" style="padding-left: 20px">
            <div class="am-fl">
                <select id="work_edit_content_type" style="border: none;">
                    <option value="0" <?php if (!isset($workMsg->Type) || $workMsg->Type == 0) echo 'selected'; ?>>类型
                    </option>
                    <option value="1" <?php if (isset($workMsg->Type) && $workMsg->Type == 1) echo 'selected'; ?>>定制
                    </option>
                    <option value="2" <?php if (isset($workMsg->Type) && $workMsg->Type == 2) echo 'selected'; ?>>自制
                    </option>
                </select>
            </div>
            <div class="am-fl" style="width: 430px; padding-left: 10px;">
                <input id="work_edit_tittle"
                       type="text"
                       class="am-form-field am-round am-fl am-text-xs"
                       placeholder="请填写作品标题"
                       style="padding: 3px 20px;border-color: #f3f2f3;background-color: #f3f2f3;"
                       value="<?php if (isset($workMsg)) echo $workMsg->Name; ?>"/>
            </div>
        </div>
        <div id="img_add_o"
             style="padding-top: 100px; width:100%;height:350px;text-align:center;<?php if (isset($workMsg) && $workMsg->Picture != '') echo 'display:none;' ?>">
            <a onclick="img_add_trig()">
                <div style="margin-left: auto; margin-right: auto; padding-top: 23px;background-color: #29b6f6; border-radius: 100%; height: 70px; width: 70px;">
                    <i style="color: white;" class="am-icon-photo am-icon-md"></i>
                </div>
                <div style="height: 20px;"></div>
                <div class="app-gray-color am-text-xs">最多9张图,每张保持在1M以内</div>
            </a>
        </div>
        <div id="img_big_demo"
             style="margin: 10px; <?php if (!(isset($workMsg) && $workMsg->Picture != '')) echo 'display:none;' ?>">
            <img style="width: 100%; height: auto;" src="<?php if (isset($workMsg) && $workMsg->Picture != '') {
                $workImgList = explode(";", $workMsg->Picture);
                $workImg = make_img_name::make_img_mini_name($workImgList[0]);
                echo "{$CfgPara->httproot}/works_pic/{$workImg}";
            } ?>"/>
        </div>
        <div id="img_list_demo" style="padding:0 10px;<?php if (!isset($workImgList)) echo 'display:none;' ?>">
            <?php
            if (isset($workImgList)) {
                $workImgCount = 0;
                foreach ($workImgList as $imgName) {
                    if (isset($imgName) && $imgName != '') {
                        $workImg = make_img_name::make_img_mini_name($imgName);
                        if ($workImgCount == 0) {
                            $img_class = 'app-img-border-act';
                        } else {
                            $img_class = 'app-img-border-dis';
                        }
                        echo "<img data-file-name='server|{$imgName}' onclick='img_sele_change(this)' class='app-img-preview app-img-border {$img_class}' src='{$CfgPara->httproot}/works_pic/{$workImg}' />";
                        $workImgCount++;
                    }
                }
            }
            ?>
        </div>
        <div id="img_edit_btn" style="height:38px;padding:10px;<?php if (!isset($workImgList)) echo 'display:none;' ?>">
            <button class="am-fl am-btn am-btn-xs am-radius am-btn-success" style="margin-right:5px"
                    onclick="img_add_trig()">
                <i class="am-icon am-icon-plus"></i>添加
            </button>
            <button class="am-fl am-btn am-btn-xs am-radius am-btn-danger" id="work_edit_img_dele"
                    onclick="img_edit_dele()">
                <i class="am-icon am-icon-minus"></i>删除
            </button>
            <span class="am-fr"><span
                        id="img_count"><?php if (isset($workImgCount)) echo $workImgCount; else echo '0'; ?></span>/9</span>
        </div>
    </div>
</div>
<div id="work_edit_toolbar" style="width:100%">
</div>
<form id="upload_img_form" style="display:none" action="<?php echo $CfgPara->httproot ?>/index.php" method="post"
      enctype="multipart/form-data">
    <input name="controller" type="text" value="work_edit"/>
    <input name="work_id" type="text" value="<?php if (isset($workMsg)) echo $workMsg->Id; else echo '0'; ?>"/>
    <input name="work_name" type="text" value=""/>
    <input name="introd" type="text" value=""/>
    <input name="type" type="text" value=""/>
    <input name="stype" type="text" value=""/>
    <input name="tags" type="text" value=""/>
    <input name="releasedt" type="text" value=""/>
    <input name="work_img_names" type="text" value=""/>
    <input name="work_state" type="text" value=""/>
    <input name="img_upload[]" type="file" onchange="img_show_change(this)"/>
</form>
<script type="text/javascript">
    //$('#work_edit_content_releasedt').datepicker({ format: 'yyyy-mm-dd' });
    //img_show_upload_ini();
</script>